% Remember to use the lgrind style

\Head{}
\File{./java/Router.java}{2006}{4}{27}{19:09}{8189}
\L{\LB{\C{}/*}}
\L{\LB{_*_Router.java}}
\L{\LB{_*}}
\L{\LB{_*_Created_on_January_8,_2006,_1:45_PM}}
\L{\LB{_*/\CE{}}}
\L{\LB{\C{}//_\<applet_code={'}Router{'}_width={'}200{'}_height={'}50{'}\>\</applet\>\CE{}}}
\L{\LB{}}
\L{\LB{\K{package}_\V{project01};}}
\L{\LB{}}
\L{\LB{\K{import}_\V{javax}.\V{swing}.*;}}
\L{\LB{\K{import}_\V{javax}.\V{swing}.\V{event}.*;}}
\L{\LB{\K{import}_\V{java}.\V{awt}.*;}}
\L{\LB{\K{import}_\V{java}.\V{awt}.\V{event}.*;}}
\L{\LB{\K{import}_\V{java}.\V{applet}.*;}}
\L{\LB{\C{}//import_com.bruceeckel.swing.*;\CE{}}}
\L{\LB{\C{}//import_java.io.*;\CE{}}}
\L{\LB{\K{import}_\V{java}.\V{util}.*;}}
\L{\LB{\K{import}_\V{project01}.\V{DirectionsFrame};}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}/**}}
\L{\LB{_*_Sets_up_the_environment_and_runs_the_Map_Shortest_Path_Route_program;}}
\L{\LB{_*_contains_listener_methods_that_work_with_the_\{\CE{}\V{link}_\V{MapComponent}\}.}}
\L{\LB{_*_}}
\L{\LB{_*_\C{}author_Ian_Melnick}}
\L{\LB{_*/\CE{}}}
\L{\LB{\K{public}_\K{class}_\V{Router}_\K{extends}_\V{Main}_\{}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\K{private}_\V{JComboBox}_\V{cStart},_\V{cEnd};}}
\L{\LB{}\Tab{4}{\C{}//private_JSlider_sPanX,_sPanY;\CE{}}}
\L{\LB{}\Tab{4}{\K{private}_\V{JPanel}_\V{bottom},_\V{bottomL},_\V{bottomC},_\V{bottomR};}}
\L{\LB{}\Tab{4}{\K{private}_\V{JLabel}_\V{status};}\Tab{30}{}}
\L{\LB{}\Tab{4}{\K{private}_\V{MapComponent}_\V{imc};}}
\L{\LB{}\Tab{4}{\K{private}_\V{Vector}\<\V{MapItem}\>_\V{nodes};}}
\L{\LB{}\Tab{4}{\K{private}_\V{Container}_\V{cp};}}
\L{\LB{}\Tab{4}{\K{private}_\V{ButtonMethods}_\V{bm};}}
\L{\LB{}\Tab{4}{\K{private}_\V{MouseMethods}_\V{mm};}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{}}
\index{Router}\Proc{Router}\L{\LB{}\Tab{4}{\K{public}_\V{Router}(\V{Args}_\V{a})_\{}}
\L{\LB{}\Tab{8}{\K{this}.\V{a}}\Tab{16}{=_\V{a};}}
\L{\LB{}\Tab{8}{\V{setMap}(\V{a}.\V{map});}}
\L{\LB{}\Tab{8}{\V{setNodeList}();}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\index{setMap}\Proc{setMap}\L{\LB{}\Tab{4}{\K{public}_\K{void}_\V{setMap}(\V{String}_\V{mapName})_\{}}
\L{\LB{}\Tab{8}{\V{imc}_=_\K{new}_\V{MapComponent}(\V{mapName});}}
\L{\LB{}\Tab{8}{\V{imc}.\V{initMap}();}}
\L{\LB{}\Tab{8}{\V{imc}.\V{nm}.\V{loadNodes}();}}
\L{\LB{}\Tab{4}{\}}}
\index{getMap}\Proc{getMap}\L{\LB{}\Tab{4}{\K{public}_\V{String}_\V{getMap}()_\{}}
\L{\LB{}\Tab{8}{\K{return}_\V{imc}.\V{map}();}}
\L{\LB{}\Tab{4}{\}}}
\index{getMapManager}\Proc{getMapManager}\L{\LB{}\Tab{4}{\K{public}_\V{MapComponent}.\V{MapManager}_\V{getMapManager}()_\{}}
\L{\LB{}\Tab{8}{\K{return}_\K{this}.\V{imc}.\V{mm};}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\index{setNodeList}\Proc{setNodeList}\L{\LB{}\Tab{4}{\K{private}_\K{void}_\V{setNodeList}()_\{}}
\L{\LB{}\Tab{8}{\V{nodes}_=_\K{new}_\V{Vector}\<\V{MapItem}\>(\N{1});}}
\L{\LB{}\Tab{8}{\V{nodes}.\V{add}(\K{new}_\V{MapItem}(\-\N{1},_\V{imc}.\V{map}(),_\S{}\3\-\-\-\-_\3\SE{}+\V{imc}.\V{map}()+\S{}\3_\-\-\-\-\3\SE{}));}}
\L{\LB{}\Tab{8}{\V{nodes}.\V{addAll}(\V{imc}.\V{nm}.\V{nodeVector}());}}
\L{\LB{}\Tab{8}{\C{}//_Open_the_imc{'}s_of_all_maps_and_append_their_nodes_to_this_vector\CE{}}}
\L{\LB{}\Tab{8}{\V{MapComponent}_\V{j};}}
\L{\LB{}\Tab{8}{\K{for}(\V{String}_\V{mapName}_\V{:}_\V{Utility}.\V{map\_images}(\K{null}))_\{}}
\L{\LB{}\Tab{12}{\V{mapName}_=_\V{mapName}.\V{split}(\S{}\3map\_\3\SE{})[\N{1}];}}
\L{\LB{}\Tab{12}{\V{mapName}_=_\V{mapName}.\V{substring}(\N{0},_\V{mapName}.\V{length}()\-\N{4});}}
\L{\LB{}\Tab{12}{\K{if}(\V{mapName}.\V{compareTo}(\V{imc}.\V{map}())!=\N{0})_\{}}
\L{\LB{}\Tab{16}{\V{nodes}.\V{add}(\K{new}_\V{MapItem}(\-\N{1},_\V{mapName},_\S{}\3\-\-\-\-_\3\SE{}+\V{mapName}+\S{}\3_\-\-\-\-\3\SE{}));}}
\L{\LB{}\Tab{16}{\V{j}_=_\K{new}_\V{MapComponent}(\V{mapName});}}
\L{\LB{}\Tab{16}{\V{j}.\V{nm}.\V{loadNodes}();}}
\L{\LB{}\Tab{16}{\V{nodes}.\V{addAll}(\V{j}.\V{nm}.\V{nodeVector}());}}
\L{\LB{}\Tab{12}{\}}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}\Tab{8}{\V{j}_=_\K{null};}}
\L{\LB{}\Tab{4}{\}}}
\index{showDirections}\Proc{showDirections}\L{\LB{}\Tab{4}{\K{private}_\K{void}_\V{showDirections}(\V{Dijkstra}_\V{d})_\{}}
\L{\LB{}\Tab{8}{\K{new}_\V{DirectionsFrame}(\K{this},_\V{d});}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\C{}/**}}
\L{\LB{}\Tab{5}{*_Listener_methods_for_mouse_actions_}}
\L{\LB{}\Tab{5}{*/\CE{}}}
\L{\LB{}\Tab{4}{\K{private}_\K{class}_\V{MouseMethods}_\K{extends}_\V{MouseInputAdapter}_\K{implements}_\V{MouseWheelListener}_\{}}
\L{\LB{}\Tab{8}{\K{private}_\V{Point}_\V{mouseClickPoint},_\V{mouseReleasePoint},_\V{newNode};}}
\L{\LB{}\Tab{8}{\K{private}_\K{boolean}_\V{mouseDragged},_\V{scrollDirection};}\Tab{68}{\C{}//_scroll_direction_=_false,_use_y,_true_use_x\CE{}}}
\index{mouseMoved}\Proc{mouseMoved}\L{\LB{}\Tab{8}{\K{public}_\K{void}_\V{mouseMoved}(\V{MouseEvent}_\V{e})_\{}}
\L{\LB{}\Tab{8}{\}}}
\index{mouseClicked}\Proc{mouseClicked}\L{\LB{}\Tab{8}{\K{public}_\K{void}_\V{mouseClicked}(\V{MouseEvent}_\V{e})_\{}}
\L{\LB{}\Tab{12}{\K{if}((\V{e}.\V{getButton}()==\N{1}_\|\,\|_\V{e}.\V{getButton}()==\N{3})_\&\&_\V{e}.\V{getClickCount}()==\N{2})_\{}}
\L{\LB{}\Tab{16}{\V{NodeItem}_\V{selNode}_=_\V{imc}.\V{nm}.\V{getNodeAtCoords}(\V{e}.\V{getPoint}());}}
\L{\LB{}\Tab{16}{\K{try}_\{}}
\L{\LB{}\Tab{20}{\K{if}(\V{selNode}==\K{null}_\|\,\|}}
\L{\LB{}\Tab{28}{(\V{cStart}.\V{getSelectedItem}().\V{getClass}()==\V{NodeItem}.\K{class}_\&\&}}
\L{\LB{}\Tab{28}{\V{cEnd}.\V{getSelectedItem}().\V{getClass}()==\V{NodeItem}.\K{class}))_\{}}
\L{\LB{}\Tab{24}{\V{cStart}.\V{setSelectedItem}(\V{nodes}.\V{get}(\N{0}));}}
\L{\LB{}\Tab{24}{\V{cEnd}.\V{setSelectedItem}(\V{nodes}.\V{get}(\N{0}));}}
\L{\LB{}\Tab{20}{\}}}
\L{\LB{}\Tab{20}{\K{else}_\K{if}(\V{cStart}.\V{getSelectedItem}().\V{getClass}()!=\V{NodeItem}.\K{class})}}
\L{\LB{}\Tab{24}{\V{cStart}.\V{setSelectedItem}(\V{selNode});}}
\L{\LB{}\Tab{20}{\K{else}_\K{if}(\V{cEnd}.\V{getSelectedItem}().\V{getClass}()!=\V{NodeItem}.\K{class})}}
\L{\LB{}\Tab{24}{\V{cEnd}.\V{setSelectedItem}(\V{selNode});}}
\L{\LB{}\Tab{16}{\}_\K{catch}_(\V{java}.\V{lang}.\V{NullPointerException}_\V{error})_\{}}
\L{\LB{}\Tab{20}{\V{Errors}.\V{debug}(\S{}\3Not_a_valid_point\3\SE{});}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{12}{\}}}
\L{\LB{}\Tab{8}{\}}}
\index{mousePressed}\Proc{mousePressed}\L{\LB{}\Tab{8}{\K{public}_\K{void}_\V{mousePressed}(\V{MouseEvent}_\V{e})_\{}}
\L{\LB{}\Tab{12}{\K{this}.\V{mouseClickPoint}_=_\V{e}.\V{getPoint}();}}
\L{\LB{}\Tab{12}{\K{if}(\V{e}.\V{getButton}()==\N{2})}}
\L{\LB{}\Tab{16}{\K{this}.\V{scrollDirection}_=_!\K{this}.\V{scrollDirection};}}
\L{\LB{}\Tab{8}{\}}}
\index{mouseDragged}\Proc{mouseDragged}\L{\LB{}\Tab{8}{\K{public}_\K{void}_\V{mouseDragged}(\V{MouseEvent}_\V{e})_\{}}
\L{\LB{}\Tab{12}{\K{this}.\V{mouseDragged}_=_\K{true};}}
\L{\LB{}\Tab{8}{\}}}
\index{mouseReleased}\Proc{mouseReleased}\L{\LB{}\Tab{8}{\K{public}_\K{void}_\V{mouseReleased}(\V{MouseEvent}_\V{e})_\{}}
\L{\LB{}\Tab{12}{\K{this}.\V{mouseReleasePoint}_=_\V{e}.\V{getPoint}();}}
\L{\LB{}\Tab{12}{\K{if}(\K{this}.\V{mouseDragged}_\&\&_!\K{this}.\V{mouseReleasePoint}.\V{equals}(\K{this}.\V{mouseClickPoint}))_\{}}
\L{\LB{}\Tab{16}{\K{if}(\V{e}.\V{getButton}()==\N{1}_\|\,\|_\V{e}.\V{getButton}()==\N{3})_\{}}
\L{\LB{}\Tab{20}{\V{imc}.\V{mm}.\V{offsetByMouse}(\K{this}.\V{mouseClickPoint},_\K{this}.\V{mouseReleasePoint});}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{16}{}}
\L{\LB{}\Tab{16}{\K{this}.\V{mouseDragged}=\K{false};}}
\L{\LB{}\Tab{12}{\}}}
\L{\LB{}\Tab{8}{\}}}
\index{mouseWheelMoved}\Proc{mouseWheelMoved}\L{\LB{}\Tab{8}{\K{public}_\K{void}_\V{mouseWheelMoved}(\V{MouseWheelEvent}_\V{e})_\{}}
\L{\LB{}\Tab{12}{\V{Point}_\V{newCoords}_=_\K{new}_\V{Point}();}}
\L{\LB{}\Tab{12}{\K{if}(\K{this}.\V{scrollDirection})_\{}}
\L{\LB{}\Tab{16}{\V{newCoords}.\V{setLocation}(_\V{imc}.\V{getCoordinates}().\V{getX}()\-(\V{e}.\V{getWheelRotation}()*\N{50}),_\V{imc}.\V{getCoordinates}().\V{getY}()_);}}
\L{\LB{}\Tab{16}{\C{}//sPanX.setValue((int)newCoords.getX());\CE{}}}
\L{\LB{}\Tab{12}{\}}}
\L{\LB{}\Tab{12}{\K{else}_\{}}
\L{\LB{}\Tab{16}{\V{newCoords}.\V{setLocation}(_\V{imc}.\V{getCoordinates}().\V{getX}(),_\V{imc}.\V{getCoordinates}().\V{getY}()\-(\V{e}.\V{getWheelRotation}()*\N{50})_);}}
\L{\LB{}\Tab{16}{\C{}//sPanY.setValue((int)newCoords.getY());\CE{}}}
\L{\LB{}\Tab{12}{\}}}
\L{\LB{}\Tab{12}{\V{imc}.\V{mm}.\V{setOrigin}(\V{newCoords});}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\C{}/**}}
\L{\LB{}\Tab{5}{*_Listener_methods_for_button/combobox_actions}}
\L{\LB{}\Tab{5}{*/\CE{}}}
\L{\LB{}\Tab{4}{\K{private}_\K{class}_\V{ButtonMethods}_\K{implements}_\V{ActionListener}_\{}}
\index{actionPerformed}\Proc{actionPerformed}\L{\LB{}\Tab{8}{\K{public}_\K{void}_\V{actionPerformed}(\V{ActionEvent}_\V{e})_\{}}
\L{\LB{}\Tab{12}{\K{if}(\V{e}.\V{getSource}()_==_\V{cEnd}_\&\&_}}
\L{\LB{}\Tab{14}{(\V{cStart}.\V{getSelectedItem}().\V{getClass}()==\V{NodeItem}.\K{class}_\&\&_}}
\L{\LB{}\Tab{15}{\V{cEnd}.\V{getSelectedItem}().\V{getClass}()==\V{NodeItem}.\K{class})_)_\{}}
\L{\LB{}\Tab{16}{}}
\L{\LB{}\Tab{16}{\V{NodeItem}_\V{start}_=_(\V{NodeItem})\V{cStart}.\V{getSelectedItem}();}}
\L{\LB{}\Tab{16}{\V{NodeItem}_\V{end}}\Tab{31}{=_(\V{NodeItem})\V{cEnd}.\V{getSelectedItem}();}}
\L{\LB{}\Tab{16}{}}
\L{\LB{}\Tab{16}{\K{if}(\V{start}.\V{map}().\V{compareTo}(\V{imc}.\V{map}())!=\N{0})_\{}}
\L{\LB{}\Tab{20}{\V{setMap}(\V{start}.\V{map}());}}
\L{\LB{}\Tab{20}{\V{update}();}}
\L{\LB{}\Tab{16}{\}}}
\L{\LB{}\Tab{16}{}}
\L{\LB{}\Tab{16}{\V{showDirections}(\K{new}_\V{Dijkstra}(\V{imc}.\V{nm},_\V{imc}.\V{nm}.\V{getNodeById}(\V{start}.\V{id}()),_\V{end}));}}
\L{\LB{}\Tab{12}{\}}}
\L{\LB{}\Tab{8}{\}}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{\C{}/**}}
\L{\LB{}\Tab{5}{*_Listener_methods_for_slider_actions}}
\L{\LB{}\Tab{5}{*/\CE{}}}
\L{\LB{}\Tab{4}{\C{}/*_}}
\L{\LB{}\Tab{5}{*_private_class_SliderMethods_implements_ChangeListener_\{}}
\L{\LB{}\Tab{5}{*}\Tab{9}{public_void_stateChanged(ChangeEvent_e)_\{}}
\L{\LB{}\Tab{5}{*}\Tab{13}{JSlider_s_=_(JSlider)e.getSource();}}
\L{\LB{}\Tab{5}{*}\Tab{13}{Point_newCoords_=_new_Point();}}
\L{\LB{}\Tab{5}{*}\Tab{13}{if(!s.getValueIsAdjusting())_\{}}
\L{\LB{}\Tab{5}{*}\Tab{17}{if(e.getSource()==sPanY)}}
\L{\LB{}\Tab{5}{*}\Tab{21}{newCoords.setLocation(_imc.getCoordinates().getX(),_s.getValue()_);}}
\L{\LB{}\Tab{5}{*}\Tab{17}{else_if(e.getSource()==sPanX)}}
\L{\LB{}\Tab{5}{*}\Tab{21}{newCoords.setLocation(_s.getValue(),_imc.getCoordinates().getY()_);}}
\L{\LB{}\Tab{5}{*}\Tab{17}{imc.mm.setOrigin(newCoords);}}
\L{\LB{}\Tab{5}{*}\Tab{13}{\}}}
\L{\LB{}\Tab{5}{*}\Tab{9}{\}}}
\L{\LB{}\Tab{5}{*\}*/\CE{}}}
\L{\LB{}\Tab{4}{}}
\index{getAppletInfo}\Proc{getAppletInfo}\L{\LB{}\Tab{4}{\K{public}_\V{String}_\V{getAppletInfo}()_\{}}
\L{\LB{}\Tab{8}{\K{return}_\S{}\3(c)_Ian_Melnick,_Union_College_2005\-2006\3\SE{};}}
\L{\LB{}\Tab{4}{\}}}
\index{getParameterInfo}\Proc{getParameterInfo}\L{\LB{}\Tab{4}{\K{public}_\V{String}[\,][\,]_\V{getParameterInfo}()_\{}}
\L{\LB{}\Tab{8}{\V{String}_\V{pinfo}[\,][\,]_=_\{}}
\L{\LB{}\Tab{12}{\{\S{}\3m\3\SE{},\S{}\3String\3\SE{},\S{}\3Map_file_to_load_(specify_location/floor_only,_i.e.,_map\_scieneg\_000.jpg_is_loaded_with_arg_scieng\_000)\3\SE{}\}}}
\L{\LB{}\Tab{12}{\C{}/*\{\3w\3,\3Integer\3,\3Width_of_map_window_(px)\3\},}}
\L{\LB{}\Tab{12}{\{\3h\3,\3Integer\3,\3Height_of_map_window_(px)\3\}*/\CE{}}}
\L{\LB{}\Tab{8}{\};}}
\L{\LB{}\Tab{8}{\K{return}_\V{pinfo};}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{}}
\L{\LB{}\Tab{4}{}}
\index{init}\Proc{init}\L{\LB{}\Tab{4}{\K{public}_\K{void}_\V{init}()_\{}}
\L{\LB{}\Tab{8}{\V{cp}}\Tab{16}{=_\V{getContentPane}();}}
\L{\LB{}\Tab{8}{\V{mm}}\Tab{16}{=_\K{new}_\V{MouseMethods}();}}
\L{\LB{}\Tab{8}{\V{bm}}\Tab{16}{=_\K{new}_\V{ButtonMethods}();}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{status}}\Tab{16}{=_\K{new}_\V{JLabel}();}}
\L{\LB{}\Tab{8}{\V{cStart}}\Tab{16}{=_\K{new}_\V{JComboBox}(\V{nodes});}}
\L{\LB{}\Tab{8}{\V{cEnd}}\Tab{16}{=_\K{new}_\V{JComboBox}(\V{nodes});}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{cStart}.\V{addActionListener}(\V{bm});}}
\L{\LB{}\Tab{8}{\V{cEnd}.\V{addActionListener}(\V{bm});}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{bottom}}\Tab{16}{=_\K{new}_\V{JPanel}(\K{new}_\V{GridLayout}(\N{1},\N{3}));}}
\L{\LB{}\Tab{8}{\V{bottomL}_=_\K{new}_\V{JPanel}(\K{new}_\V{FlowLayout}());}}
\L{\LB{}\Tab{8}{\V{bottomC}_=_\K{new}_\V{JPanel}(\K{new}_\V{FlowLayout}());}}
\L{\LB{}\Tab{8}{\V{bottomR}_=_\K{new}_\V{JPanel}(\K{new}_\V{FlowLayout}());}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{bottomL}.\V{add}(\K{new}_\V{JLabel}(\S{}\3From\3\SE{}));}}
\L{\LB{}\Tab{8}{\V{bottomL}.\V{add}(\V{cStart});}}
\L{\LB{}\Tab{8}{\V{bottomL}.\V{add}(\K{new}_\V{JLabel}(\S{}\3to\3\SE{}));}}
\L{\LB{}\Tab{8}{\V{bottomL}.\V{add}(\V{cEnd});}}
\L{\LB{}\Tab{8}{\V{bottomR}.\V{add}(\V{status});}}
\L{\LB{}\Tab{8}{\V{bottom}.\V{add}(\V{bottomL});}}
\L{\LB{}\Tab{8}{\V{bottom}.\V{add}(\V{bottomR});}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{cp}.\V{setLayout}(\K{new}_\V{BorderLayout}());}}
\L{\LB{}\Tab{8}{\V{cp}.\V{add}(\V{bottom},_\V{BorderLayout}.\V{SOUTH});}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\V{update}();}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\index{update}\Proc{update}\L{\LB{}\Tab{4}{\K{public}_\K{void}_\V{update}()_\{}}
\L{\LB{}\Tab{8}{\V{status}.\V{setText}(\S{}\3map:_\3\SE{}_+_\V{imc}.\V{map}());}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\V{imc}.\V{addMouseListener}(\V{mm});}}
\L{\LB{}\Tab{8}{\V{imc}.\V{addMouseMotionListener}(\V{mm});}}
\L{\LB{}\Tab{8}{\V{imc}.\V{addMouseWheelListener}(\V{mm});}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\K{if}(\V{cp}.\V{getComponentCount}()\>=\N{2})}}
\L{\LB{}\Tab{12}{\V{cp}.\V{remove}(\N{1});}}
\L{\LB{}}
\L{\LB{}\Tab{8}{\V{cp}.\V{add}(\V{imc});}}
\L{\LB{}\Tab{8}{}}
\L{\LB{}\Tab{8}{\C{}//contentPane.paintComponents(contentPane.getGraphics());\CE{}}}
\L{\LB{}\Tab{8}{\V{cp}.\V{validate}();}}
\L{\LB{}\Tab{4}{\}}}
\L{\LB{}\Tab{4}{}}
\L{\LB{\}}}
